//
//  BTConsultCell.m
//  BaxTer
//
//  Created by wsj2015 on 2016/11/17.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "BTConsultCell.h"
#import "UIImageView+BTimageView.h"
#import "WCImageView +setImage.h"
#import "NSString+Utilities.h"

@implementation BTConsultCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    CGFloat f =  kScreenFactor;
    self.imageHeight.constant = f * 150;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

- (void)setModel:(BTCosultModel *)model{
//    bigUrlImg = "http://media.hulijia360.com/media/upload/image/nurse-learning/2017-02-27/7abb9645-4d55-4532-af3c-484060463fd0.jpg";
//    content = "<p>d \U7684</p>";
//    createDate = 1488183137000;
//    createUserId = "<null>";
//    createUserName = "<null>";
//    id = 20;
//    isOpen = "<null>";
//    questionID = "<null>";
//    remark = "\U6492\U65e6\U98de\U6d12\U7684";
//    smallUrlImg = "http://media.hulijia360.com/media/upload/thumb/nurse-learning/2017-02-27/7abb9645-4d55-4532-af3c-484060463fd0.jpg";
//    status = "<null>";
//    subjectName = "\U5730\U65b9\U963f\U65af";
//    topTime = "<null>";
//    type = ORDINARY;
//    types = "<null>";
//    viewNum = 0;
    
    _model = model;
    
    //[self.iconImageView bt_setImageWithUrl:model.titleImageId];
    
    self.hTitle.text = model.subjectName;
    
    if (model.remark) {
        NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[model.remark dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
     
         self.desLabel.attributedText = attrStr;
    }else{
        self.desLabel.attributedText = [[NSAttributedString alloc] initWithString:@""];
    }
  
    
    self.dateLabel.text = [NSString stringWithFormat:@"发布日期:%@", [NSString timeStringYYMMDDFrom:[model.createDate longLongValue]]];
    [self.iconImageView bt_setImageWithUrl:model.smallUrlImg];
    
    
    
}


@end
